# $Id: PKGBUILD 88666 2013-04-21 13:40:47Z speps $
# Maintainer : speps <speps at aur dot archlinux dot org>
# Contributor:  <farid at archlinux-br.org>

_name=SuperCollider
pkgname=supercollider
pkgver=3.6.4
pkgrel=1
pkgdesc="An environment and programming language for real time audio synthesis and algorithmic composition"
arch=('i686' 'x86_64')
url="http://supercollider.sourceforge.net/"
license=('GPL3')
depends=('jack' 'fftw' 'cwiid' 'qtwebkit')
makedepends=('cmake' 'ruby' 'vim' 'emacs')
optdepends=('emacs: emacs interface'
            'gedit: gedit interface'
            'vim: vim interface'
            'ruby: vim support')
install="$pkgname.install"
source=("http://download.sourceforge.net/project/$pkgname/Source/${pkgver%.*}/$_name-$pkgver-Source-linux.tar.bz2")
md5sums=('a6f0c1183f311ffcfbc143dce2332d74')

build() {
  cd "$srcdir/$_name-Source"
  [ -d bld ] || mkdir bld && cd bld
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
           -DCMAKE_BUILD_TYPE=Release \
           -DLIBSCSYNTH=ON
  make
}

package() {
  cd "$srcdir/$_name-Source/bld"
  make DESTDIR="$pkgdir/" install
}
